const validator = require('./validator.min')
validator.isBlank = function (data) {
    return data === undefined || data === null || data === ""
}

// Page对象增强
module.exports = function (option) {
    option = option || {}
    option.onInput = function (event) {
        this.setData({
            [event.currentTarget.dataset.dt]: event.detail.value
        })
    }
    option.validator = validator
    return Page(option)
}